﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace PlayDeezGames.Common
{
    public delegate void MessageId();
    public class MessageBase
    {
        private MessageId messageId = default(MessageId);
        public MessageId MessageId
        {
            get
            {
                return messageId;
            }
        }
        private MessageBase() { }
        public MessageBase(MessageId theMessageId)
        {
            messageId = theMessageId;
        }
    }
    public class MessageWithPayload<U>:MessageBase
    {
        private U payload = default(U);
        public U Payload
        {
            get
            {
                return payload;
            }
        }
        public MessageWithPayload(MessageId theMessageId, U thePayload)
            :base(theMessageId)
        {
            payload = thePayload;
        }
    }
}
